3.347 \(\int \frac{\sqrt{x} (A+B x)}{a+b x} \, dx\)

Optimal. Leaf size=69 \[ \frac{2 \sqrt{x} (A b-a B)}{b^2}-\frac{2 \sqrt{a} (A b-a B) \tan ^{-1}\left (\frac{\sqrt{b} \sqrt{x}}{\sqrt{a}}\right )}{b^{5/2}}+\frac{2 B x^{3/2}}{3 b} \]

[Out]

(2*(A*b - a*B)*Sqrt[x])/b^2 + (2*B*x^(3/2))/(3*b) - (2*Sqrt[a]*(A*b - a*B)*ArcTan[(Sqrt[b]*Sqrt[x])/Sqrt[a]])/
b^(5/2)

________________________________________________________________________________________

Rubi [A]  time = 0.0327636, antiderivative size = 69, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.222, Rules used = {80, 50, 63, 205} \[ \frac{2 \sqrt{x} (A b-a B)}{b^2}-\frac{2 \sqrt{a} (A b-a B) \tan ^{-1}\left (\frac{\sqrt{b} \sqrt{x}}{\sqrt{a}}\right )}{b^{5/2}}+\frac{2 B x^{3/2}}{3 b} \]

Antiderivative was successfully verified.

[In]

Int[(Sqrt[x]*(A + B*x))/(a + b*x),x]

[Out]

(2*(A*b - a*B)*Sqrt[x])/b^2 + (2*B*x^(3/2))/(3*b) - (2*Sqrt[a]*(A*b - a*B)*ArcTan[(Sqrt[b]*Sqrt[x])/Sqrt[a]])/
b^(5/2)

Rule 80

Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[(b*(c + d*x)
^(n + 1)*(e + f*x)^(p + 1))/(d*f*(n + p + 2)), x] + Dist[(a*d*f*(n + p + 2) - b*(d*e*(n + 1) + c*f*(p + 1)))/(
d*f*(n + p + 2)), Int[(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n, p}, x] && NeQ[n + p + 2,
0]

Rule 50

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((a + b*x)^(m + 1)*(c + d*x)^n)/(b*
(m + n + 1)), x] + Dist[(n*(b*c - a*d))/(b*(m + n + 1)), Int[(a + b*x)^m*(c + d*x)^(n - 1), x], x] /; FreeQ[{a
, b, c, d}, x] && NeQ[b*c - a*d, 0] && GtQ[n, 0] && NeQ[m + n + 1, 0] &&  !(IGtQ[m, 0] && ( !IntegerQ[n] || (G
tQ[m, 0] && LtQ[m - n, 0]))) &&  !ILtQ[m + n + 2, 0] && IntLinearQ[a, b, c, d, m, n, x]

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin{align*} \int \frac{\sqrt{x} (A+B x)}{a+b x} \, dx &=\frac{2 B x^{3/2}}{3 b}+\frac{\left (2 \left (\frac{3 A b}{2}-\frac{3 a B}{2}\right )\right ) \int \frac{\sqrt{x}}{a+b x} \, dx}{3 b}\\ &=\frac{2 (A b-a B) \sqrt{x}}{b^2}+\frac{2 B x^{3/2}}{3 b}-\frac{(a (A b-a B)) \int \frac{1}{\sqrt{x} (a+b x)} \, dx}{b^2}\\ &=\frac{2 (A b-a B) \sqrt{x}}{b^2}+\frac{2 B x^{3/2}}{3 b}-\frac{(2 a (A b-a B)) \operatorname{Subst}\left (\int \frac{1}{a+b x^2} \, dx,x,\sqrt{x}\right )}{b^2}\\ &=\frac{2 (A b-a B) \sqrt{x}}{b^2}+\frac{2 B x^{3/2}}{3 b}-\frac{2 \sqrt{a} (A b-a B) \tan ^{-1}\left (\frac{\sqrt{b} \sqrt{x}}{\sqrt{a}}\right )}{b^{5/2}}\\ \end{align*}

Mathematica [A]  time = 0.0336418, size = 63, normalized size = 0.91 \[ \frac{2 \sqrt{x} (-3 a B+3 A b+b B x)}{3 b^2}+\frac{2 \sqrt{a} (a B-A b) \tan ^{-1}\left (\frac{\sqrt{b} \sqrt{x}}{\sqrt{a}}\right )}{b^{5/2}} \]

Antiderivative was successfully verified.

[In]

Integrate[(Sqrt[x]*(A + B*x))/(a + b*x),x]

[Out]

(2*Sqrt[x]*(3*A*b - 3*a*B + b*B*x))/(3*b^2) + (2*Sqrt[a]*(-(A*b) + a*B)*ArcTan[(Sqrt[b]*Sqrt[x])/Sqrt[a]])/b^(
5/2)

________________________________________________________________________________________

Maple [A]  time = 0.006, size = 78, normalized size = 1.1 \begin{align*}{\frac{2\,B}{3\,b}{x}^{{\frac{3}{2}}}}+2\,{\frac{A\sqrt{x}}{b}}-2\,{\frac{Ba\sqrt{x}}{{b}^{2}}}-2\,{\frac{Aa}{b\sqrt{ab}}\arctan \left ({\frac{b\sqrt{x}}{\sqrt{ab}}} \right ) }+2\,{\frac{B{a}^{2}}{{b}^{2}\sqrt{ab}}\arctan \left ({\frac{b\sqrt{x}}{\sqrt{ab}}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x+A)*x^(1/2)/(b*x+a),x)

[Out]

2/3*B*x^(3/2)/b+2/b*A*x^(1/2)-2/b^2*B*a*x^(1/2)-2*a/b/(a*b)^(1/2)*arctan(b*x^(1/2)/(a*b)^(1/2))*A+2*a^2/b^2/(a
*b)^(1/2)*arctan(b*x^(1/2)/(a*b)^(1/2))*B

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*x^(1/2)/(b*x+a),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 2.44965, size = 305, normalized size = 4.42 \begin{align*} \left [-\frac{3 \,{\left (B a - A b\right )} \sqrt{-\frac{a}{b}} \log \left (\frac{b x - 2 \, b \sqrt{x} \sqrt{-\frac{a}{b}} - a}{b x + a}\right ) - 2 \,{\left (B b x - 3 \, B a + 3 \, A b\right )} \sqrt{x}}{3 \, b^{2}}, \frac{2 \,{\left (3 \,{\left (B a - A b\right )} \sqrt{\frac{a}{b}} \arctan \left (\frac{b \sqrt{x} \sqrt{\frac{a}{b}}}{a}\right ) +{\left (B b x - 3 \, B a + 3 \, A b\right )} \sqrt{x}\right )}}{3 \, b^{2}}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*x^(1/2)/(b*x+a),x, algorithm="fricas")

[Out]

[-1/3*(3*(B*a - A*b)*sqrt(-a/b)*log((b*x - 2*b*sqrt(x)*sqrt(-a/b) - a)/(b*x + a)) - 2*(B*b*x - 3*B*a + 3*A*b)*
sqrt(x))/b^2, 2/3*(3*(B*a - A*b)*sqrt(a/b)*arctan(b*sqrt(x)*sqrt(a/b)/a) + (B*b*x - 3*B*a + 3*A*b)*sqrt(x))/b^
2]

________________________________________________________________________________________

Sympy [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: TypeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*x**(1/2)/(b*x+a),x)

[Out]

Exception raised: TypeError

________________________________________________________________________________________

Giac [A]  time = 1.1509, size = 86, normalized size = 1.25 \begin{align*} \frac{2 \,{\left (B a^{2} - A a b\right )} \arctan \left (\frac{b \sqrt{x}}{\sqrt{a b}}\right )}{\sqrt{a b} b^{2}} + \frac{2 \,{\left (B b^{2} x^{\frac{3}{2}} - 3 \, B a b \sqrt{x} + 3 \, A b^{2} \sqrt{x}\right )}}{3 \, b^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*x^(1/2)/(b*x+a),x, algorithm="giac")

[Out]

2*(B*a^2 - A*a*b)*arctan(b*sqrt(x)/sqrt(a*b))/(sqrt(a*b)*b^2) + 2/3*(B*b^2*x^(3/2) - 3*B*a*b*sqrt(x) + 3*A*b^2
*sqrt(x))/b^3